home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
GXEnvironment.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
8KB
|
359 lines
;
; File: GXEnvironment.a
;
; Contains: QuickDraw GX environment constants and interfaces
;
; Version: Technology: Quickdraw GX 1.1
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
__GXENVIRONMENT__ SET 1
IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
include 'ConditionalMacros.a'
ENDIF
IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
include 'MixedMode.a'
ENDIF
IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
include 'Windows.a'
ENDIF
IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
include 'GXTypes.a'
ENDIF
IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
include 'CMApplication.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
defaultPollingHandlerFlags EQU $00
okToSwitchDuringPollFlag EQU $00
dontSwitchDuringPollFlag EQU $01
; typedef long gxPollingHandlerFlags
;
; extern gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetGraphicsPollingHandler
move.w #$0245,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetGraphicsPollingHandler
ENDIF
;
; extern void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXSetGraphicsPollingHandler
move.w #$0246,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXSetGraphicsPollingHandler
ENDIF
; QD to QD GX Translator typedefs
gxDefaultOptionsTranslation EQU $0000
gxOptimizedTranslation EQU $0001
gxReplaceLineWidthTranslation EQU $0002
gxSimpleScalingTranslation EQU $0004
gxSimpleGeometryTranslation EQU $0008 ; implies simple scaling
gxSimpleLinesTranslation EQU $000C ; implies simple geometry & scaling
gxLayoutTextTranslation EQU $0010 ; turn on gxLine layout (normally off)
gxRasterTargetTranslation EQU $0020
gxPostScriptTargetTranslation EQU $0040
gxVectorTargetTranslation EQU $0080
gxPDDTargetTranslation EQU $0100
gxDontConvertPatternsTranslation EQU $1000
; typedef long gxTranslationOption
gxContainsFormsBegin EQU $0001
gxContainsFormsEnd EQU $0002
gxContainsPostScript EQU $0004
gxContainsEmptyPostScript EQU $0008
; typedef long gxTranslationStatistic
gxQuickDrawPictTag EQU 'pict'
gxQuickDrawPict RECORD 0
; translator inputs
options ds.l 1 ; offset: $0 (0)
srcRect ds Rect ; offset: $4 (4)
styleStretch ds Point ; offset: $C (12)
; size of quickdraw picture data
dataLength ds.l 1 ; offset: $10 (16)
; file alias
alias ds gxBitmapDataSourceAlias ; offset: $14 (20)
sizeof EQU * ; size: $1E (30)
ENDR
; WindowRecord utilities
;
; extern gxViewPort GXNewWindowViewPort(WindowRef qdWindow)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXNewWindowViewPort
move.w #$0236,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXNewWindowViewPort
ENDIF
;
; extern gxViewPort GXGetWindowViewPort(WindowRef qdWindow)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetWindowViewPort
move.w #$0237,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetWindowViewPort
ENDIF
;
; extern WindowRef GXGetViewPortWindow(gxViewPort portOrder)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetViewPortWindow
move.w #$0238,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetViewPortWindow
ENDIF
; GDevice utilities
;
; extern GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetViewDeviceGDevice
move.w #$0239,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetViewDeviceGDevice
ENDIF
;
; extern gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetGDeviceViewDevice
move.w #$023A,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetGDeviceViewDevice
ENDIF
; gxPoint utilities
;
; extern void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXConvertQDPoint
move.w #$023B,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXConvertQDPoint
ENDIF
; printing utilities typedef
; typedef gxShapeSpoolProcPtr gxShapeSpoolFunction
; typedef gxUserViewPortFilterProcPtr gxUserViewPortFilter
; typedef gxConvertQDFontProcPtr gxConvertQDFontFunction
; mouse utilities
; return mouse location in fixed-gxPoint global space
;
; extern void GXGetGlobalMouse(gxPoint *globalPt)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetGlobalMouse
move.w #$023C,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetGlobalMouse
ENDIF
; return fixed-gxPoint local mouse (gxViewPort == 0 --> default)
;
; extern void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetViewPortMouse
move.w #$023D,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetViewPortMouse
ENDIF
; printing utilities
;
; extern gxUserViewPortFilterUPP GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetViewPortFilter
move.w #$025E,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetViewPortFilter
ENDIF
;
; extern void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilterUPP filter, long refCon)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXSetViewPortFilter
move.w #$023E,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXSetViewPortFilter
ENDIF
; QD to QD GX Translator functions
;
; extern void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXInstallQDTranslator
move.w #$023F,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXInstallQDTranslator
ENDIF
;
; extern gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXRemoveQDTranslator
move.w #$0240,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXRemoveQDTranslator
ENDIF
;
; extern gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXConvertPICTToShape
move.w #$0241,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXConvertPICTToShape
ENDIF
; Find the best GX style given a QD font and face. Called by the QD->GX translator
;
; extern long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXConvertQDFont
move.w #$0242,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXConvertQDFont
ENDIF
;
; extern gxConvertQDFontUPP GXGetConvertQDFont(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetConvertQDFont
move.w #$0243,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetConvertQDFont
ENDIF
;
; extern void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXSetConvertQDFont
move.w #$0244,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXSetConvertQDFont
ENDIF
; ColorSync 2.0 interface related routines
;
; extern void GXSetColorProfileReference(gxColorProfile profile, CMProfileRef reference)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXSetColorProfileReference
move.w #$0282,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXSetColorProfileReference
ENDIF
;
; extern CMProfileRef GXGetColorProfileReference(gxColorProfile profile)
;
IF ¨ GENERATINGCFM THEN
Macro
_GXGetColorProfileReference
move.w #$0283,D0
dc.w $A832
EndM
ELSE
IMPORT_CFM_FUNCTION GXGetColorProfileReference
ENDIF
ENDIF
ENDIF ; __GXENVIRONMENT__